from django.conf.urls.defaults import patterns
from django.contrib.auth.decorators import login_required
from pet.views import EuroConvMonthView, EuroConvDailyCreateView,\
    EuroConvDailyListView, EuroConvDailyDeleteView, EuroConvDailyUpdateView,\
    CreateDeviationView, ListDeviationsView, UpdateDeviationView,\
    DeleteDeviationView, IndexView
from django.views.generic.dates import ArchiveIndexView, MonthArchiveView,\
    YearArchiveView
from pet.models import EuroConvDaily
from tracking.models import TrackRecordForex
from django.views.generic.base import TemplateView

urlpatterns = patterns(
    "pet.views"
    , (r"^$", IndexView.as_view())
    
    , (r"^euroconv/$", "euroconv")
    
    , (r"^euroconv/daily/$", login_required(EuroConvDailyListView.as_view()))
    , (r"^euroconv/daily/add/$", login_required(EuroConvDailyCreateView.as_view()))
    , (r"^euroconv/import/daily/$", "import_euro_conv_daily")
    , (r"^euroconv/daily/(?P<pk>\d+)/$", login_required(EuroConvDailyUpdateView.as_view()))
    , (r"^euroconv/daily/(?P<pk>\d+)/delete/", login_required(EuroConvDailyDeleteView.as_view()))
    
    , (r"^deviations/$", login_required(ListDeviationsView.as_view()))
    , (r"^deviation/add/$", login_required(CreateDeviationView.as_view()))
    , (r"^deviation/(?P<pk>\d+)/$", login_required(UpdateDeviationView.as_view()))
    , (r"^deviation/(?P<pk>\d+)/delete/$", login_required(DeleteDeviationView.as_view()))
    , (r"^deviations/import/$", "import_deviations")
    
    , (r"^dvratio/$", "dvratio")
    , (r"^archiveperf/$", "archive_perf")
    , (r"^profitlosses/$", "profit_losses")
    , (r"^futurestradesamount/$", "futures_trades_amount")
    , (r"^futurescontractsamount/$", "futures_contracts_amount")
    , (r"^rfipor1/$", "rfi_pro1")
    , (r"^rfipor3/$", "rfi_pro3")

    # Ajax URL    
    , (r"^getarchiveperf/$", "get_archive_perf")
    , (r"^getdvratio/$", "get_dvratio")
    , (r"^geteuroconv/$", "get_euro_conv")
    , (r"^getprofitlosses/$", "get_profit_losses")
    , (r"^getfuturestradesamount/$", "get_futures_trades_amount")
    , (r"^getfuturescontractsamount/$", "get_futures_contracts_amount")

)
